package com.wtgroup.demo.mianshi.算法.排序;

import java.util.Arrays;

/**
 * @author dafei
 * @version 0.1
 * @date 2021/1/25 19:19
 */
public class SortUtil {

    public static void swap(int[] arr, int i, int j) {
        int tmp = arr[i];
        arr[i] = arr[j];
        arr[j] = tmp;

        // // 异或交换
        // arr[i] = arr[i] ^ arr[j];
        // arr[j] = arr[i] ^ arr[j];
        // arr[i] = arr[i] ^ arr[j];
    }

    public static void print(int[] arr) {
        System.out.println(Arrays.toString(arr));
    }

}
